package view.admin.logIn;

import com.jfoenix.controls.JFXButton;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import view.Main;

/**
 * @author Limohan
 */
public class AdminLoginController {
    private  Main myApp;
    public void setApp(Main myApp){
        this.myApp = myApp;
    }
    public AdminLoginController() {
    }

    @FXML
    private JFXButton UserManage;

    @FXML
    private JFXButton FactoryInfo;

    @FXML
    private JFXButton ProductType;

    @FXML
    private JFXButton ProdctInfo;

    @FXML
    private JFXButton EquipmengType;

    @FXML
    private JFXButton Eqiupment;

    @FXML
    private ImageView adminMenu;

    @FXML
    private ImageView admin;

    @FXML
    private void initialize(){
        admin.setImage(new Image("\\view\\admin\\image\\admin.png",true));
        adminMenu.setImage(new Image("\\view\\admin\\image\\admin.jpg",true));

    }



    @FXML
    void equipmengType(ActionEvent event) throws Exception {
        myApp.goToEquipTypeManagePage();
    }

    @FXML
    void equipment(ActionEvent event) throws Exception {
        myApp.goToEquipMsgManagePage();
    }

    @FXML
    void factoryInfo(ActionEvent event) throws Exception {
        myApp.goToFactoryManagePage();

    }

    @FXML
    void productInfo(ActionEvent event) throws Exception {
        myApp.goToProductMsgManagePage();

    }

    @FXML
    void productType(ActionEvent event) throws Exception {
        myApp.goToProductTypeManagePage();

    }

    @FXML
    void userManage(ActionEvent event) throws Exception {
        myApp.goToAdminUserControllerPage();

    }


}
